#pragma once
#include "SymptomUnit.h"
#include "SymptomBuilder.h"
#include <qwidget.h>
#include <qcommandlinkbutton.h>
#include <QVBoxLayout>
#include <qgroupbox.h>

class SymptomBuilder;
class SymptomUnit;

class SymptomGroup
{
public:
	SymptomGroup(SymptomBuilder* parent,const QString& name);
	void buildGroup(const QStringList& unitNames);
	SymptomUnit* addSymptomUnit(const QString& unitName);
	SymptomBuilder* getBuilder(){return builder;}
	QString getName(){return name;}
	SymptomUnit* getUnit(const QString& name);
	QCommandLinkButton* getButton(){return button;}
	QGridLayout* getLayout(){return grid;}
	~SymptomGroup(void);

private:
	void _createButtonArea();
	void _createGroupBoxArea();
	QCommandLinkButton* button;
	QGroupBox* box;
	QGridLayout* grid;
	QHash<QString,SymptomUnit*> nameSymptomUnitMap;
	QString name;
	SymptomBuilder* builder;
};

